<template>
	<div class="four">
		{{this.$store.state.num}}
		{{num}}--{{str}}---{{flag}}
		
	</div>
</template>

<script>
	import {mapState} from "vuex"
	
	export default{
		name:"Four",
		data(){
			return{
				
			}
		},
		// computed:{//缓存
		// 	num(){
		// 		return this.$store.state.num
		// 	}
		// }
		//computed:mapState(["num","str","flag"])
		// computed:mapState({
		// 	numa:state=>state.num,
		// 	stra:"str",
		// 	flaga(state){
		// 		return state.flag?"ok":"no"
		// 	}
		// }),
		computed:{
			...mapState(["num","str","flag"]),
			total(){
				return 102;
			}
		}
	}
</script>

<style>
</style>